<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>FOG-无拘才自在</title>
		<link rel="stylesheet" type="text/css" href="../css/login.css" />
	</head>
	<body>
		
<section class="container">
		<nav class="nav">
			<div class="nav_logo">FOG</div>

			<div class="nav_content">
				<div class="nav_content_text">
					<a href="../index.html">首页</a>
				</div>

				<div class="nav_content_text">
					<a href="login.html">登录</a>
				</div>
					
				<div class="nav_content_text">
					<a href="../Admin/authentication.html">控制台</a>
				</div>
			</div>
		</nav>
		
		
		<header>
			<div class="left">
				好久不见
				<br>&nbsp;&nbsp;
				雾一直在等你。
			</div>
		</header>
		
		
		<div class="right">	
			<form id="loginForm">
				
				<div class="title">登&nbsp;录</div>
				
            	<div class="form-item">
                	<label for="username">账&nbsp;号</label>
                	<input type="text" id="username" name="username" required>
            	</div>
            
            	<div class="form-item">
                	<label for="password">密&nbsp;码</label>
                	<input type="password" id="password" name="password" required>
            	</div>
   
   
            	<button type="submit" class="submit-btn">登&nbsp;录</button>
            
            	<div class="toRegist">暂无账号？<a href="regist.html">去注册</a></div>

			</form>
        	
		</div>
</section>

		<script>
		const loginForm = document.getElementById('loginForm');
		loginForm.addEventListener('submit', function(e) {
			e.preventDefault();
			const username = document.getElementById('username').value;
			const password = document.getElementById('password').value;
			if (!username || !password) {
				alert('请输入账号和密码');
				return;
			}
			
			// 模拟登录验证（实际项目中替换为后端API请求）
			if (username === '123' && password === '123') {
				alert(`欢迎${username}用户登录 成功`);
				setTimeout(() => {
					window.location.href = 'personal_center.html';
				}, 1000);
			} else {
				alert('账号或密码错误，请重新输入');
			}
		});
	</script>

	</body>
</html>
